package com.xxxt.jxj.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;
import com.xxxt.dao.ClassGradeMapper;
import com.xxxt.entity.ClassGrade;
import com.xxxt.entity.Student;
import com.xxxt.jxj.service.ClassGradeService;
@Service
@Transactional
public class ClassGradeServiceImpl implements ClassGradeService  {
	@Resource
	private ClassGradeMapper classGradeMapper;
	
	@Override
	public boolean updateClassGrade(ClassGrade classGrade) {
		return classGradeMapper.updateClassGrade(classGrade);
	}

	@Override
	public ClassGrade queryOneClassGradeByClassGradeId(String ClassGradeId) {
		// TODO Auto-generated method stub
		return classGradeMapper.queryOneClassGradeByClassGradeId(ClassGradeId);
	}

	@Override
	public List<ClassGrade> selectAllClassGradeByGradeId(String gradeId) {
		// TODO Auto-generated method stub
		return classGradeMapper.selectAllClassGradeByGradeId(gradeId);
	}

	@Override
	public boolean insertOneClassGrade(ClassGrade classGrade) {
		// TODO Auto-generated method stub
		return classGradeMapper.insertOneClassGrade(classGrade);
	}

	@Override
	public List<ClassGrade> selcetAllClassGrade() {
		// TODO Auto-generated method stub
		return classGradeMapper.selcetAllClassGrade();
	}

	@Override
	public List<ClassGrade> selcetAllPageClassGradeByGradeId(String gradeId,int pageNum,int pageSize) {
		// TODO Auto-generated method stub
		return classGradeMapper.selcetAllPageClassGradeByGradeId(gradeId);
	}

	@Override
	public boolean deleteClassGrade(String classGradeId) {
		// TODO Auto-generated method stub
		return classGradeMapper.deleteClassGrade(classGradeId);
	}

	@Override
	public boolean updateClassGradeForAdmin(String classGradeId, String classGradeName, String gradeId,
			String id) {
		// TODO Auto-generated method stub
		return classGradeMapper.updateClassGradeForAdmin(classGradeId, classGradeName, gradeId, id);
	}

	@Override
	public List<Student> selectStudentByTnoAndClassGrade(String tno, String classGradeId, int pageNum, int pageSize) {
		
		return classGradeMapper.selectStudentByTnoAndClassGrade(tno, classGradeId);
	}

	@Override
	public List<Student> selectStudentByTnoAndList(String tno, List<ClassGrade> classGradeIds
		,int pageNum,int pageSize) {
		// TODO Auto-generated method stub
		return classGradeMapper.selectStudentByTnoAndList(tno, classGradeIds);
	}

	
}
